
<template>
	<view class="allbody">
		<view>
			<image class="headImg" :src="src"></image>
		</view>
		<view class="title">
			<text>{{title}}</text>
		</view>
		<view class="text">
			<text>申请加入{{assostionName}}</text>
		</view>
<!-- 		<view class="time">
			<text>30分钟前</text>
		</view> -->
	<view>
		<button class="button_yes" @click="arrgee()">同意</button>
	</view>
	<view>
		<button class="button_no" @click="refuse()">拒绝</button>
	</view>
		<view class="bottomLine"></view>
	</view>
</template>

<script>
	export default {
		name:"examineCard",
		props:{
			title:'',
			// text:'',
			// time:'',
			src:'',
			id:'',
			item:{},
			assostionName:'',
			assostionId:'',
		},
		data() {
			return {
				
			};
		},
		methods:{
			arrgee(){
				let id=this.item.id
				
				let that=this
				uni.showModal({
					title: '你确定要同意该用户吗',
					success: function (res) {
						if (res.confirm) {
							uni.request({
									method:'POST',
									url:'https://www.codingyt.com/club/userOrganization/update',
									data: {
									    "userId": id,
									    "organizationId": that.assostionId,
									    "role": "members"  
									},
									success(res) {
										
									}
								})
							
						} else if (res.cancel) {
							
						}
					}
				});
			},
			refuse(){
				let id=this.item.id
				
				let that=this
				uni.showModal({
					title: '你确定要拒绝该用户吗',
					success: function (res) {
						if (res.confirm) {
							uni.request({
									method:'POST',
									url:'https://www.codingyt.com/club/userOrganization/delete',
									data: {
									    "userId": id,
									    "organizationId": that.assostionId,
									},
									success(res) {
										
									}
								})
							
						} else if (res.cancel) {
							
						}
					}
				});
				},
		}
	}
</script>

<style scoped>
	.allbody{
		height: 200rpx;
		margin-top: 20px;
	}
	.headImg{
			left: 10rpx;
			top: 56rpx;
			width: 116rpx;
			height: 116rpx;
			border-radius: 82rpx;
			position: relative;
		}
		.title{
			left: 154rpx;
			top: -70rpx;
			width: 108rpx;
			height: 52rpx;
			color: rgba(16, 16, 16, 100);
			font-size: 36rpx;
			text-align: left;
			  ;
			position: relative;
		}
		.text{
			left: 154rpx;
			top: -70rpx;
			width: 252rpx;
			height: 70rpx;
			color: rgba(155, 155, 155, 100);
			font-size: 28rpx;
			text-align: left;
			  ;
			position: relative;
			overflow: hidden;
			text-overflow: ellipsis;/*溢出显示省略号*/
			white-space:nowarp;/*强制在一行显示*/
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 2;  
		}
		.time{
			left: 288rpx;
			top: -182rpx;
			width: 102rpx;
			height: 34rpx;
			color: rgba(155, 155, 155, 100);
			font-size: 24rpx;
			text-align: left;
			  ;
			position: relative;
		}
		.button_yes{
			left: 116rpx;
			top: -193rpx;
			width: 130rpx;
			height: 55rpx;
			line-height: 57rpx;
			border-radius: 28rpx;
			background-color: rgba(245, 166, 35, 100);
			color: rgba(255, 255, 255, 100);
			font-size: 24rpx;
			text-align: center;
			font-family: Arial;
			position: relative;
		}
		.button_no{
			left: 270rpx;
			top: -245rpx;
			width: 130rpx;
			height: 55rpx;
			line-height: 57rpx;
			border-radius: 28rpx;
			background-color: rgba(238, 95, 24, 100);
			color: rgba(255, 255, 255, 100);
			font-size: 24rpx;
			text-align: center;
			font-family: Arial;
			position: relative;
		}
		.bottomLine{
			left: 0rpx;
			top: -150rpx;
			width: 750rpx;
			height: NaNpx;
			border: 1rpx solid rgba(187, 187, 187, 100);
			position: relative;
		}
	</style>